<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css"  media="all">
  <link rel="stylesheet" href="__PUBLIC__/font-awesome/css/font-awesome.min.css" media="all" />
  <link rel="stylesheet" href="__CSS__/admin.css"  media="all">
  <style type="text/css">

/* tooltip */
#tooltip{
  position:absolute;
  border:1px solid #ccc;
  background:#333;
  padding:2px;
  display:none;
  color:#fff;
}
</style>
</head>
<body style="padding:10px;">
  <div class="tplay-body-div">
    <div class="layui-tab">
      <ul class="layui-tab-title">
        <li class="layui-this">会员管理</li>
        <li><a href="{:url('admin/admin/publish')}" class="a_menu">新增会员</a></li>
      </ul>
    </div> 
    <form class="layui-form serch" action="{:url('admin/user/index')}" method="post">
        <div class="layui-form-item" style="float: left;">
          <div class="layui-input-inline">
          <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
        </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <input type="text" name="keywords" lay-verify="title" autocomplete="off" placeholder="请输入用户ID" class="layui-input layui-btn-sm">
          </div>
          <div class="layui-input-inline">
            <div class="layui-inline">
              <div class="layui-input-inline">
                <input type="text" class="layui-input" id="regtime" placeholder="注册时间" name="regtime">
              </div>
            </div>
          </div>
          <button class="layui-btn layui-btn-danger layui-btn-sm" lay-submit="" lay-filter="serch">立即提交</button>
        </div>
      </form> 
    <table class="layui-table" lay-size="sm">
      <colgroup>
        <col width="50">
        <col width="80">
        <col width="100">
        <col width="150">
        <col width="150">
        <col width="200">
        <col width="200">
        <col width="200">
        <col width="100">
      </colgroup>
      <thead>
        <tr>
          <th>UID</th>
          <th>会员账号</th>
          <th>姓名</th>
          <th>会员等级</th>
          <th>类型</th>
          <th>服务中心级别</th>
          <th>身份证</th>
          <th>手机号码</th>
          <th>推荐人</th>
          <th>推荐人数</th>
          <th>EP</th>
          <th>RP</th>
          <th>MP</th>
          <th>SP</th>
          <th>IP</th>
          <th>股票</th>
          <th>是否出局</th>
          <th>是否冻结</th>
          <th>注册时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        {volist name="user" id="vo"}
        <tr>
          <td>{$vo.uid}</td>
          <td>{$vo.username}</td>
          <td>{$vo.truename}</td>
          <td>{$vo.groupid}</td>
          <td>{$vo.pid? '子账号':'主账号'}</td>
          <td>{$vo.customsgroupid}</td>
          <td>{$vo.idcard}</td>
          <td>{$vo.userphone}</td>
          <td>{$vo.referee}</td>
          <td>{$vo.refnum}</td>
          <td>{$vo['money']}</td>
          <td>{$vo['regmoney']}</td>
          <td>{$vo['sanjsc']}</td>
          <td>{$vo['spmoney']}</td>
          <td>{$vo['bmcmoney']}</td>
          <td>{$vo['balance']}</td>
          <td>{$vo['ischuju']==0? '否':'已出局'}</td>
          <td>
            <a class="layui-btn layui-btn-xs layui-btn-primary frozen" id="{$vo.uid}" style="margin-right: 0;font-size:12px;"><img src="/static/admin/images/{$vo['canlogin']==0? 'yes.gif':'no.gif'}"/></a>
          </td>
          <td>{$vo['regtime']|date='Y-m-d H:i:s',###}</td>
          <td class="operation-menu">
            <div class="layui-btn-group">
              <a href="{:url('user/personal',['uid'=>$vo.uid])}" class="layui-btn layui-btn-xs a_menu layui-btn-primary" id="{$vo.uid}" style="margin-right: 0;font-size:12px;"><i class="layui-icon"></i></a>
            </div>
          </td>
        </tr>
        {/volist}
      </tbody>
    </table>
    <div style="padding:0 20px;">{$user->render()}</div>

    {include file="public/foot"}
    
    <script type="text/javascript">
        $('.frozen').click(function(){
            var id = $(this).attr('id');
            layer.confirm('确定要操作?', function(index) {
                $.ajax({
                    url:"{:url('admin/user/frozen')}",
                    data:{id:id},
                    success:function(res) {
                        layer.msg(res.msg);
                        if(res.code == 1) {
                            setTimeout(function(){
                                location.href = res.url;
                            },1500)
                        }
                    }
                })
            })
        })
    </script>
  </div>
</body>
</html>
